package br.edu.utfpr.backuptools.BackupTools.util.quartz.jobs;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import br.edu.utfpr.backuptools.BackupTools.controller.ControladorBackupImpl;
import br.edu.utfpr.backuptools.BackupTools.controller.interfaces.ControladorBackup;
import br.edu.utfpr.backuptools.BackupTools.controller.validator.BackupValidator;
import br.edu.utfpr.backuptools.BackupTools.model.dao.DaoBackupImpl;
import br.edu.utfpr.backuptools.BackupTools.model.dao.interfaces.DaoBackup;

public class GerarBackup implements Job{

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		DaoBackup dao = new DaoBackupImpl();
		ControladorBackup controlador = new ControladorBackupImpl(dao, new BackupValidator());
		controlador.gerarTodosBackups();
	}

}
